<!doctype html>
<html>

<head>
  <!-- css文件 -->
  {include file="public/title" /}
</head>

<body data-type="generalComponents">
  <!-- 头部 -->
  {include file="public/header" /}
  <div class="tpl-page-container tpl-page-header-fixed">
    <!-- 左侧导航 -->
    {include file="public/leftNav" /}
    <div class="tpl-content-wrapper">
      <ol class="am-breadcrumb">
        <li><a href="#" class="am-icon-home">首页</a></li>
        <li><a href="#">会员管理</a></li>
        <li class="am-active">会员日志</li>
      </ol>
      <div class="tpl-portlet-components">
        <div class="tpl-block">
          <div class="am-g">
            <div class="am-u-sm-12 am-u-md-6">
              <div class="am-btn-toolbar">
                <div class="am-btn-group am-btn-group-xs">
                </div>
              </div>
            </div>
            <div class="am-u-sm-12 am-u-md-3">
              <div class="am-form-group">
                <select data-am-selected="{btnSize: 'sm'}" onchange="optic()">
                  <option value="0">操作</option>
                  <option value="消费">消费</option>
                  <option value="充值">充值</option>
                  <option value="支出">支出</option>
                  <option value="积分消费">积分消费</option>
                  <option value="积分充值">积分充值</option>
                </select>
              </div>
            </div>
            <div class="am-u-sm-12 am-u-md-3">
              <form action="" method="GET">
                <div class="am-input-group am-input-group-sm">
                  <input type="text" name="get" class="am-form-field" placeholder="请输入编号">
                  <span class="am-input-group-btn">
                    <button class="am-btn  am-btn-default am-btn-success tpl-am-btn-success am-icon-search" type="submit"></button>
                  </span>
                </div>
              </form>
            </div>
          </div>
          
          <div class="am-g">
            <div class="am-u-sm-12">
              <table class="am-table am-table-striped am-table-hover table-main">
                <thead>
                  <tr>
                    <th class="table-title" width="5%">ID</th>
                    <th class="table-title" width="5%">编号</th>
                    <th class="table-title" width="15%">姓名</th>
                    <th class="table-title" width="15%">操作</th>
                    <th class="table-title" width="20%">金额</th>
                    <th class="table-set" width="20%">操作者</th>
                    <th class="table-set" width="20%">记录时间</th>
                  </tr>
                </thead>
                <tbody>
                  {foreach $logs as $vo}
                  <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.uid}</td>
                    <td>
                      {if condition="$vo['caozuo'] eq '支出'"}
                      {$vo.finance.name}
                      {else /}
                      {$vo.user.name}
                      {/if}
                    </td>
                    <td>
                      {$vo.caozuo}
                    </td>
                    <td>
                      {notempty name="$vo.balance"}
                        {$vo.balance}
                      {/notempty}
                    </td>
                    <td>{$vo.runner}</td>
                    <td>{$vo.create_time}</td>
                  </tr>
                  {/foreach}
                </tbody>
              </table>
              <div class="am-cf">
                <div class="am-fr">
                  <!-- 分页 -->
                  {$logs->render()}
                </div>
              </div>
              <hr>
            </div>
          </div>
        </div>
        <div class="tpl-alert"></div>
      </div>
    </div>
  </div>
</body>
{include file="public/foot" /}
<script type="text/javascript">
  function optic()
  {
    var option = $('select option:selected').val();
    $('input').val(option);
    $('form').submit(); 
  }
</script>
</html>